#ifndef __LT8920_H__
#define __LT8920_H__
#include "CH552.H"
typedef struct LT8920_ConfigReg_Tag 
{
    UINT8 reg_addr;
    UINT8 reg_data_h;
    UINT8 reg_data_l;
}LT8920_ConfigReg;
void LT8920_init(void);
UINT16 LT8920_regTest(UINT8 address);


#define LT_STAT_TX_BUSY     0xE1
#define LT_STAT_TX_ERR      0xE2
#define LT_STAT_TX_OK       0xE3
#define LT_STAT_RX_ARRIVAL  0x01
#define LT_STAT_RX_IDEL     0x00

void  LT8920_SetToRx(void);
void LT8920_TXPKT(UINT8 *buf, UINT8 len);
UINT8 LT8920_RXPKT(UINT8 *buf,UINT8 bufLen);
UINT8 LT8920_RFIFO(UINT8 *buf,UINT8 bufLen);
void LT8920_WFIFO(UINT8 *buf,UINT8 len);
void LT8920_SetChn(UINT8 chn);
UINT8 LT8920_isRxArrival(void);
void LT8920_SetSyncword(unsigned char syncword[2]);
void LT8920_SetSyncwordDefault(void);
//在pkt中断中执行的一些内容
void LT8920_PktIntJob(void);
extern void *(*LT8920_DelieveBufferCallback)(char);
#endif